<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%><!DOCTYPE HTML>
<%-- <%@include file="edit.jsp"%> --%>
<html>
<head>
<script type="text/javascript">
	$(function() {
		$('#forceUpdateFlag').radiobox({name:'entity.forceUpdateFlag',value:'1',data:[['1','是'],['0','否']]});
		$('#versionType').radiobox({name:'entity.versionType',value:'android',data:[["android",'android'],["ios",'ios']]});
		
		$('#toolbar').toolbar({buttons:[
			{name:'save',iconCls:'icon-save',text:'保存'}
	  	],handler:handler});
	});
	function handler() {
		switch(this.name) {
			case 'save': toSave();break;
		}
	}
	function toSave(){
		$.messager.progress({title:'系统提示',text:'数据处理中，请耐心等待...'});
		$.submit('#dataform',function(r) {
			$.messager.progress('close');
			if(r.code<0) return $alert(r.msg);
			top.$prompt('保存成功');
			top.$window.close(window,1,null);
		});
	}
</script>
</head>
<body>
	<div id="toolbar" class="toolbar" ></div>
	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'center',border:false">
			<form id="dataform" action="edit" method="post">
				<input type="hidden" name="entity.id" value="${item.id }" />
				<table class="form-tbl">
					<tr class="form-tr">
						<th class="form-th">当前版本号:</th>
						<td class="form-td">
							<input type="text" name="entity.currentVersion" value="${item.currentVersion }" class="easyui-textbox" style="width:70%" />
						</td>
					</tr>
					<tr class="form-tr">
						<th class="form-th">上一版本号:</th>
						<td class="form-td">
							<input type="text" name="entity.previousVersion" value="${item.previousVersion }" class="easyui-textbox" style="width:70%" />
						</td>
					</tr>
					<tr class="form-tr">
						<th class="form-th">最新的版本号:</th>
						<td class="form-td">
							<input type="text" name="entity.lastVersion" value="${item.lastVersion }" class="easyui-textbox" style="width:70%" />
						</td>
					</tr>
					<tr class="form-tr">
						<th class="form-th">是否强制更新:</th>
						<td class="form-td">
							<div id="forceUpdateFlag"></div>
						</td>
					</tr>
					<tr class="form-tr">
						<th class="form-th">版本类型:</th>
						<td class="form-td">
							<div id="versionType"></div>
						</td>
					</tr>
					
					<tr class="form-tr">
						<th class="form-th">下载路径:</th>
						<td class="form-td">
							<input class="easyui-textbox" style="width:70%;"  value="${item.downloadUrl }" data-options="disabled:true" >
							<input type ="hidden" name="entity.downloadUrl" value="${item.downloadUrl }" >
						</td>
					</tr>
					<tr class="form-tr">
						<th class="form-th">版本描述:</th>
						<td class="form-td">
							<input name="entity.versionDesc" value="${item.versionDesc }" class="easyui-textbox" style="width:70%;height: 80px;" data-options="multiline:true" />
						</td>
					</tr>
				</table>
			</form>
		</div>
	</div>
</body>
</html>